package org.anderground.modules.editor.importers.pmz.archive;

import java.io.File;
import java.io.IOException;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;

public class PmzFile {
	private ZipFile zip;
	private String name;

	public PmzFile(File file) throws ZipException, IOException {
		name = file.getName();
		zip = new ZipFile(file);
	}

	public PmzEntry getEntry(String name) {
		try {
			return new PmzEntry(zip.getInputStream(zip.getEntry(name)));
		} catch (IOException e) {
			return null;
		}
	}

	public String getFileName() {
		return name;
	}

}
